import 'package:flutter/material.dart';

class MessagePage extends StatefulWidget {
  // CategoryPage({required Key key}) : super(key: key);

  @override
  _MyStatefulWidgetState createState() => _MyStatefulWidgetState();
}

// class _CategoryPageState extends State<MessagePage> {
//
//   @override
//   Widget build(BuildContext context) {
//     print("点击了消息");
//     return Container(
//       child: Text('MessagePage...刷新'),
//     );
//   }
// }

class _MyStatefulWidgetState extends State<MessagePage> {
  bool _pinned = true;
  bool _snap = false;
  bool _floating = false;

// [SliverAppBar]s are typically used in [CustomScrollView.slivers], which in
// turn can be placed in a [Scaffold.body].
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: CustomScrollView(
        slivers: <Widget>[
          SliverList(
            delegate: SliverChildBuilderDelegate(
                  (BuildContext context, int index) {
                return Container(
                  color: index.isOdd ? Colors.white : Colors.black12,
                  height: 100.0,
                  child: Center(
                    child: Text('$index', textScaleFactor: 5),
                  ),
                );
              },
              childCount: 20,
            ),
          ),
        ],
      ),
    );
  }
}
